package com.light.wanting.emoji;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonView;
import com.light.applet.common.entity.BaseEntityView;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: 魏彪
 */
@Data
@TableName("tb_file")
public class File implements Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -1L;

    /**
     * 主键
     */
    @Id
    @TableId(value = "id", type = IdType.AUTO)
    @JsonView(BaseEntityView.class)
    private Long id;

    /**
     * 文件类型
     */
    @JsonView(BaseEntityView.class)
    private Integer type;

    /**
     * 文件地址
     */
    @JsonView(BaseEntityView.class)
    private String url;

    /**
     * 源图地址
     */
    @JsonView(BaseEntityView.class)
    @TableField(exist = false)
    private String sourceUrl;

    /**
     * 图片宽度
     */
    @JsonView(BaseEntityView.class)
    private Integer width;

    /**
     * 图片高度
     */
    @JsonView(BaseEntityView.class)
    private Integer height;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonView(BaseEntityView.class)
    private Date createTime;

    private String bucketName;

}
